CC=g++

OBJS=MemoryPool.o Thread.o xBase.o xScopeLock.o main.o Test.o xDerive.o

EXEC = mempool

$(EXEC):$(OBJS)
	$(CC) -o $@ $^ -lpthread
	rm -rf *.o

MemoryPool.o: ./pool/MemoryPool.cpp
	$(CC) -c $<

Thread.o: ./pool/Thread.cpp
	$(CC) -c $<

xBase.o: ./pool/xBase.cpp
	$(CC) -c $<

xScopeLock.o: ./pool/xScopeLock.cpp
	$(CC) -c $<

Test.o: Test.cpp
	$(CC) -c $< -I ./pool

xDerive.o: xDerive.cpp
	$(CC) -c $< -I ./pool

main.o: main.cpp
	$(CC) -c $< -I ./pool

clean:
	rm -rf *.o
